# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Hugo Doria <hugo@archlinux.org>
# Contributor: Sergej Chodarev <sergejx@centrum.sk>
# Contributor: zhuqin <zhuqin83@gmail.com>

pkgname=gedit-plugins
pkgver=40.1
pkgrel=1
pkgdesc="Collection of plugins for the gedit Text Editor"
url="https://wiki.gnome.org/Apps/Gedit/ShippedPlugins"
arch=(x86_64)
license=(GPL)
depends=(gedit python-dbus python-cairo)
makedepends=(vte3 libgit2-glib gucharmap gobject-introspection vala yelp-tools
             appstream-glib git meson)
optdepends=('gucharmap: for charmap plugin'
            'vte3: for embedded terminal'
            'libgit2-glib: for git plugin')
_commit=ff3e9f6b51698b91df2ccede481809860111e91b  # tags/40.1^0
source=("git+https://gitlab.gnome.org/GNOME/gedit-plugins.git#commit=$_commit")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  DESTDIR="$pkgdir" meson install -C build
  python -m compileall -d /usr "$pkgdir/usr"
  python -O -m compileall -d /usr "$pkgdir/usr"
}

# vim:set ts=2 sw=2 et:
